package com.basker.pisces.springcloud.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.consul.discovery.ConsulDiscoveryProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.basker.pisces.springcloud.consul.ConsulDiscoveryPropertiesPostProcessor;

@Configuration
@ConditionalOnClass(ConsulDiscoveryProperties.class)
public class ConsulConfig {

    @Bean
    @ConditionalOnClass(ConsulDiscoveryProperties.class)
    public ConsulDiscoveryPropertiesPostProcessor consulDiscoveryPropertiesPostProcessor() {
        return new ConsulDiscoveryPropertiesPostProcessor();
    }

}
